package vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VUsuario extends javax.swing.JFrame {
	private JPanel panContenedor;
	private JTextField txtUsuario;
	private JLabel lblInfAseguradora;
	private JButton btnSalir;
	private JButton btnIngresar;
	private JTextField txtClave;
	private JLabel lblClave;
	private JLabel lblUsuario;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VUsuario inst = new VUsuario();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VUsuario() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panContenedor = new JPanel();
				getContentPane().add(panContenedor, BorderLayout.CENTER);
				panContenedor.setPreferredSize(new java.awt.Dimension(409, 251));
				panContenedor.setLayout(null);
				panContenedor.setBackground(new java.awt.Color(17,139,235));
				{
					lblUsuario = new JLabel();
					panContenedor.add(lblUsuario);
					lblUsuario.setText("Usuario:");
					lblUsuario.setBounds(46, 87, 90, 15);
				}
				{
					lblClave = new JLabel();
					panContenedor.add(lblClave);
					lblClave.setText("Contraseña:");
					lblClave.setBounds(46, 135, 77, 15);
				}
				{
					txtUsuario = new JTextField();
					panContenedor.add(txtUsuario);
					txtUsuario.setBounds(184, 80, 140, 22);
					txtUsuario.setText("Admin");
				}
				{
					txtClave = new JTextField();
					panContenedor.add(txtClave);
					txtClave.setBounds(184, 132, 140, 22);
				}
				{
					btnIngresar = new JButton();
					panContenedor.add(btnIngresar);
					btnIngresar.setText("Ingresar");
					btnIngresar.setBounds(58, 195, 97, 22);
					btnIngresar.setBackground(new java.awt.Color(173,216,230));
				}
				{
					btnSalir = new JButton();
					panContenedor.add(btnSalir);
					btnSalir.setText("Salir");
					btnSalir.setBounds(210, 195, 97, 22);
					btnSalir.setBackground(new java.awt.Color(173,216,230));
				}
				{
					lblInfAseguradora = new JLabel();
					panContenedor.add(lblInfAseguradora);
					lblInfAseguradora.setText("Ingresar  al Sistema");
					lblInfAseguradora.setFont(new java.awt.Font("Andika Basic",1,18));
					lblInfAseguradora.setBounds(79, 32, 305, 29);
				}
			}
			pack();
			this.setSize(406, 271);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void addListener(ActionListener accion) {
		this.btnIngresar.addActionListener(accion);
		this.btnSalir.addActionListener(accion);
	}

}
